#!/bin/bash

# Test vdi clone functionality

. ./common

for i in `seq 0 5`; do
    _start_sheep $i
done

_wait_for_sheep 6

_cluster_format -c 6
_vdi_create base 100M -P

$DOG vdi snapshot base -s tag
$DOG vdi snapshot base -s tag

sleep 1

$DOG vdi clone -s 1 base test

sleep 1

$DOG vdi delete test

sleep 1
$DOG vdi delete base

sleep 1
$DOG vdi delete -s 1 base

sleep 3
echo there should be no vdi
_vdi_list

echo there should be no object
_node_info
